package com.sardine.base.spring;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.ScopeMetadata;
import org.springframework.context.annotation.ScopeMetadataResolver;

/**
 * ****************************************
 * Created by IntelliJ IDEA 14.1.12
 *	spring Scope策略《singleton》
 * @company:    北京京东世纪贸易有限公司
 * @description:    helloProfile
 * @author: daif
 * @version:    V1.0
 * @date:   2015/5/29 23:32
 * email:daifeng@jd.com
 * Copyright © 2015 JD Systems Incorporated. All rights reserved.
 * *****************************************
 */
public class SingletonScope implements ScopeMetadataResolver {

	@Override
	public ScopeMetadata resolveScopeMetadata(BeanDefinition definition) {
		ScopeMetadata metadata = new ScopeMetadata();
		metadata.setScopeName(BeanDefinition.SCOPE_SINGLETON);
		return metadata;
	}

}
